<template>
	<view @click="handleClick">
		<slot name="footer" />
		<!-- {{title}} -->
		<!-- {{list}} -->
		<!-- {{index}} -->
	</view>
</template>

<script setup lang="ts">
	// import {defineProps} from 'vue'
	const app = getApp();
	type Props = {
		index:Number,
		list:Object[]
		// title:string
	}
	const data = defineProps<Props>()
	// console.log(title)
	
	const handleClick = () => {
		// 1.将数据缓存下来
		app.globalData.imgList = data.list
		app.globalData.imgIndex = data.index
		// console.log(app.globalData.imgIndex)
		// 2.跳转页面
		uni.navigateTo({
			url:"/pages/imgDetail/imgDetail"
		})
	}
</script>

<style>
</style>
